package com.resourcestore.dao;

import java.util.List;

import com.resourcestore.dao.BaseDao;
import com.resourcestore.model.CourseCategory;
import com.resourcestore.model.Term;
import com.resourcestore.utils.tag.Pagination;


public class TermDao extends BaseDao {

	public List<Term> selectTerm(){
		List<Term> list=this.queryForList("selectTerm");
		return list;
	}
	
	public List<Term> selectTermPage(Term term,Pagination pagination){
		List<Term> list = this.queryForPage("selectTermPage", term,pagination);
		return list;
	}
	
	public int queryTermNum(Term term) {
		return this.queryNum("selectTermCount", term);
	}
	
	
	public Term selectTermById(Term term){
		return (Term)this.queryForObject("selectTermById", term);
	}
	public List<Term> selectTermByYear(Term term){
		List<Term> list=this.queryForList("selectTermByYear",term);
		return list;
	}

	
	public void insertTerm(Term term){
		this.insert("insertTerm", term);		
	}
	
	public void updateTerm(Term term){
		this.update("updateTerm", term);	
	}
	
	public void deleteTerm(Term term){
		this.delete("deleteTerm", term);
	}
	
	public void deleteMoreTerm(Term term){
		this.delete("deleteMoreTerm", term);
	}
}
